module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.addColumn('contacts', 'lastMessageAt', {
      type: Sequelize.DATE,
      allowNull: true
    });
    await queryInterface.addColumn('contacts', 'lastMessageText', {
      type: Sequelize.TEXT,
      allowNull: true
    });
    await queryInterface.addColumn('contacts', 'status', {
      type: Sequelize.STRING,
      allowNull: true,
      defaultValue: 'offline'
    });
  },
  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeColumn('contacts', 'lastMessageAt');
    await queryInterface.removeColumn('contacts', 'lastMessageText');
    await queryInterface.removeColumn('contacts', 'status');
  }
}; 